import { useEffect, useState } from "react"
import { getChannels } from "@/apis/publish"
const useChannel = () => {
  // 频道列表
  const [channels, setChannels] = useState([])
  useEffect(() => {
    async function getChannelList() {
      const res = await getChannels()
      setChannels(res.data.channels)
    }
    getChannelList()
  }, [])
  return {
    channels,
  }
}

export default useChannel
